# Maintainer: Willow Barraco <contact@willowbarraco.fr>
pkgname=habitctl
pkgver=0.1.0
pkgrel=2
pkgdesc="Minimalist command line tool to track and examine habits"
url="https://github.com/blinry/habitctl"
arch="aarch64 armhf armv7 ppc64le x86 x86_64"  # limited by rust/cargo
license="GPL-2.0-or-later"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/blinry/$pkgname/archive/refs/tags/$pkgver.tar.gz"
options="!check"  # no tests provided


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
7fddd078804d863f2bedc442db558b49d506381438ed2af7ca1197799d6135fd4e3ae3d9afc1203b48f78c6e2bc89a628fa6894352f5730e46d7ca84880eefa7  habitctl-0.1.0.tar.gz
"
